﻿@model IEnumerable<Biblioteca.Models.Autor>

@{
    ViewBag.Title = "Autores";
}
<p>
    @Html.ActionLink("Agregar Nuevo", "Create", new { }, new { @class = "button green small" })
</p>
<table id="results">
    <tr>
        <th>
            Apellido
        </th>
        <th>
            Nombre
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Apellido)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Nombre)
        </td>
        <td>
            @Html.ActionLink("Editar", "Edit", new { id=item.IdAutor }, new { @class = "button gray small" }) 
            @Html.ActionLink("Detalle", "Details", new { id = item.IdAutor }, new { @class = "button gray small" }) 
            @Html.ActionLink("Eliminar", "Delete", new { id = item.IdAutor }, new { @class = "button gray small" }) 
        </td>
    </tr>
}

</table>
<div id="pageNavPosition"></div>
<script type="text/javascript"><!--
    var pager = new Pager('results', 7);
    pager.init();
    pager.showPageNav('pager', 'pageNavPosition');
    pager.showPage(1);
    //--></script>
